let domain = 'https://mock.mengxuegu.com/mock/5fdc6ffb5b350029c77c973a/mxg-education-app/'

function http({
  url,
  method,
  header,
  data
}) {
  return new Promise((resolve, reject) => {
    uni.request({
      url: domain + url,
      header,
      method,
      data,
      success: (res) => {
        resolve(res)
      },
      fail: (err) => {
        reject(err)
      }
    });
  })
}
export {
  http
}
